<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>创建考试 - 在线考试系统</title>
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
    <div class="navbar">
        <h1>在线考试系统 - 教师端</h1>
    </div>

    <div class="content">
        <div class="section">
            <h2>创建新考试</h2>
            <form action="{{ url_for('create_exam') }}" method="POST" enctype="multipart/form-data">
                <div class="form-group">
                    <label for="exam-title">考试标题</label>
                    <input type="text" id="exam-title" name="exam-title" required>
                </div>
                <div class="form-group">
                    <label for="exam-desc">考试描述</label>
                    <textarea id="exam-desc" name="exam-desc" rows="4" required></textarea>
                </div>
                <div class="form-group">
                    <label for="exam-date">考试日期</label>
                    <input type="date" id="exam-date" name="exam-date" required>
                </div>
                <button type="submit" class="primary-btn">创建考试</button>
            </form>
        </div>

        <div class="section">
            <h2>上传题目文件</h2>
            <form action="/upload" method="post" enctype="multipart/form-data">
                <div class="form-group">
                    <label for="question_type">选择题类型</label>
                    <select name="question_type" id="question_type">
                        <option value="questionsxuanze">选择题</option>
                        <option value="question2">判断题</option>
                        <option value="questions">主观题</option>
                    </select>
                </div>
                <div class="form-group">
                    <label for="file">选择文件</label>
                    <input type="file" id="file" name="file">
                </div>
                <button type="submit" class="primary-btn">上传</button>
            </form>
        </div>
    </div>
</body>
</html>
